package com.thitech.sif;

import com.thitech.sif.socket.ISocketExecutor;
import com.thitech.sif.socket.SocketExecutor;
import com.thitech.sif.ws.IWSExecutor;
import com.thitech.sif.ws.WsExecutor;

/**
 * 服务执行器创建工厂
 * @author shisheng.lian
 * @date 2014-08-13
 */
public abstract class ExecutorFactory {
	
	/**
	 * 创建Web Service服务执行器
	 * @return WSExecutor对象
	 */
	public static IWSExecutor createWSExecutor() {
		return new WsExecutor();
	}

	/**
	 * 创建Web Service服务执行器
	 * @param serviceId 服务唯一ID
	 * @param ticket 业务数据标识
	 * @param businessId 业务规则ID
	 * @return WSExecutor对象
	 */
	public static IWSExecutor createWSExecutor(String serviceId, String ticket,
			String businessId) {
		return new WsExecutor(serviceId, ticket, businessId);
	}

	/**
	 * 创建Socket服务执行器
	 * @return SocketExecutor对象
	 */
	public static ISocketExecutor createSocketExecutor() {
		return new SocketExecutor();
	}

	/**
	 * 创建Socket服务执行器
	 * @param serviceId 服务唯一ID
	 * @param ticket 业务数据标识
	 * @param businessId 业务规则ID
	 * @return SocketExecutor对象
	 */
	public static ISocketExecutor createSocketExecutor(String serviceId,
			String ticket, String businessId) {
		return new SocketExecutor(serviceId, ticket, businessId);
	}
}
